package com.pinxixi.ucenter.controller;

import com.alibaba.fastjson.JSON;
import com.pinxixi.framework.model.response.CommonCode;
import com.pinxixi.framework.model.response.QueryResponseResult;
import org.springframework.security.jwt.Jwt;
import org.springframework.security.jwt.JwtHelper;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletRequest;
import java.util.Map;

/**
 * @author Administrator
 * @version 1.0
 **/
@RestController
@RequestMapping("/ucenter")
public class UcenterController {

    @GetMapping("/userInfo")
    @CrossOrigin(origins = "*")
    public QueryResponseResult userInfo(){
//        String token = request.getHeader("Authorization");
//        Jwt decode = JwtHelper.decode(token);
//        String claims = decode.getClaims();
//        Map map = JSON.parseObject(claims, Map.class);
        System.out.println(1111111);
        return new QueryResponseResult(CommonCode.SUCCESS,null);
    }

}
